/* 
 *
 */
package com.cory.admin.sys.controller.admin;

import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import com.cory.admin.sys.controller.AdminController;
import com.cory.admin.sys.domain.entity.SysLoginLog;
import com.cory.admin.sys.service.SysLoginLogService;
import com.github.pagehelper.PageInfo;

/**
 * 登录日志
 * @author xiongcong
 * @date 2020-02-03
 */
@Controller
@RequestMapping("admin/sys/loginLog")
public class SysLoginLogController extends AdminController {
    @Autowired
    private SysLoginLogService sysLoginLogService;

    @RequestMapping("list")
    public String list(@RequestParam Map<String, String> param, Model model) {
        param.put("tenantId", super.getTenantId().toString());
        
        super.startPage();
        List<SysLoginLog> list = sysLoginLogService.list(param);
        
        model.addAttribute("page", new PageInfo<>(list));
        model.addAttribute("param", param);
        return "admin/sys/login.log";
    }
}
